class Exploitdb < Formula
  desc "The official Exploit Database"
  homepage "https://www.exploit-db.com/"
  url "https://github.com/offensive-security/exploit-database.git",
      :tag => "2018-01-01",
      :revision => "07e51f4126f518780ad3ef8761cc1458e936dfb8"
  version "2018-01-01"
  head "https://github.com/offensive-security/exploit-database.git"

  bottle :unneeded

  def install
    inreplace "searchsploit", "gitpath=\"/opt/exploit-database\"", "gitpath=\"#{pkgshare}\""
    bin.install "searchsploit"
    pkgshare.install %w[.git exploits files_exploits.csv files_shellcodes.csv
                        shellcodes]
  end

  test do
    system "#{bin}/searchsploit", "sendpage"
  end
end
